<div class="header">
  <div class="navbar navbar-default" role="navigation">
    <div class="">
      {% if site.crossSite == true %}
      <ul class="top-nav">
        <!--<li><i class="fa fa-globe" aria-hidden="true"></i></li>-->
        {% for link in site.cross-site %}
        <li class="{{ current }}">
          <a href="{{ link.url }}">{{ link.title }}</a> /
        </li>
        {% endfor %}
        <li>{{ site.name }}</li>
      </ul>
      {% endif %}
    </div>
    <div class="container">

      <!-- Brand and toggle get grouped for better mobile display -->
      <div class="navbar-header">
        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
          <span class="sr-only">Toggle navigation</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a class="navbar-brand" href="/index.html">
          <img id="logo-header" src="{{site.logo}}" alt="{{site.description}}" width="200" height="80" />
        </a>
      </div>

      <!-- Collect the nav links, forms, and other content for toggling -->
      <div class="collapse navbar-collapse navbar-responsive-collapse">
        <ul class="nav navbar-nav navbar-right">

        {% assign urlpieces = page.url | split: '/' %}
        {% for link in site.navigation %}
            {% assign current = nil %}
            {% assign strippedcontext = link.context | remove: "/" %}
            {% if urlpieces[1] contains strippedcontext %}  <!--this will break if context isn't in the first part of the url-->
                {% assign current = 'active' %}
            {% endif %}
            <li class="{{current}}">
                {% if link.subnavigation != null %}
                <a href="{{ link.url }}" id="{{ link.id }}" data-toggle="dropdown">{{ link.title }}</a>
                <ul class="dropdown-menu {% if link.multicol == true %}multicol{% endif %}" role="menu" aria-labelledby="{{ link.id }}">
                {% for sublink in link.subnavigation %}
                  <li><a href="{{ sublink.url }}">{{ sublink.title }}</a></li>
                {% endfor %}
                </ul>
                {% else %}
                <a href="{{ link.url }}">{{ link.title }}</a>
                {% endif %}
            </li>
          {% endfor %}
          {% if site.display-search-in-header == true %}
            {% include wmt/search.html %}
          {% endif %}
        </ul>
      </div>
    </div>
  </div>
</div><!-- END header -->
